<?php
include 'sql_config.php';
$name = $_POST['name'];
$w = $_POST['w'];
$j = $_POST['j'];
$start_time = $_POST['start_time'];
$deathline =$_POST['deathline'];

$sql = "INSERT INTO rent (name, jiage, start_time, deathline, w) VALUES (?, ?, ?, ?, ?)";
$stmt = $conn->prepare($sql);
$stmt->bind_param("sssss", $name, $j, $start_time, $deathline, $w);

if($stmt->execute()){
    echo "添加成功";
} else {
    echo "ERROR: ";
}

$stmt->close();
$conn->close();


?>